<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML>
<html>
<head>
<base href="${pageContext.request.contextPath}/">

<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>新闻发布系统管理后台</title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div id="header">
		<div id="welcome">欢迎使用新闻管理系统！</div>
		<div id="nav">
			<div id="logo">
				<img src="images/logo.jpg" alt="新闻中国" />
			</div>
			<div id="a_b01">
				<img src="images/a_b01.gif" alt="" />
			</div>
		</div>
	</div>
	<div id="admin_bar">
		<div id="status">
			管理员：${user.uname} 登录 &#160;&#160;&#160;&#160;
			<a href="LogoutServlet">login out</a>
			 &#160;&#160;&#160;&#160;<a href="index.jsp">返回首页</a>
		</div>
		<div id="channel"></div>
	</div>

	<div id="main">
		<jsp:include page="/include_elements/left.jsp"></jsp:include>

		<div id="opt_area">
			<script language="javascript">
				function clickdel() {
					return confirm("删除请点击确认");
				}
			</script>
			<c:if test="${! empty mess }"> 
				<script>
					alert("${mess}");
				</script>
				<c:remove var="mess" scope="request"/>
			</c:if>
			<ul class="classlist">
				<c:forEach items="${pageNews.list}" var="n" varStatus="s">
					<li>${n.ntitle}<span> 作者：${n.nauthor} <a href='GoNewsModifyServlet?nid=${n.nid}&pageNo=${pageNews.pageNo}'>修改</a> 
					&#160;&#160;&#160;&#160; <a href='DelNewsServlet?nid=${n.nid}&pageNo=${pageNews.pageNo}' onclick='return clickdel()'>删除</a></span>
					</li>
					<c:if test="${s.count%5==0 }">
						<li class='space'></li>
					</c:if>
				</c:forEach>
		      	  	
	  	  		<li  style="padding-right:0px;"><p align="right"> 当前页数:[${pageNews.pageNo}/${pageNews.pageNums}] 
			   	&nbsp;<a href="AdminServlet?pageNo=1">首页</a>
			   	<c:if test="${pageNews.pageNo>1}">
			   		&nbsp;<a href="AdminServlet?pageNo=${pageNews.pageNo-1}">上一页</a>
			   	</c:if>
			   	<c:if test="${pageNews.pageNo<pageNews.pageNums}">
			   		&nbsp;<a href="AdminServlet?pageNo=${pageNews.pageNo+1}">下一页</a>
			   	</c:if>
			   	&nbsp;<a href="AdminServlet?pageNo=${pageNews.pageNums}">末页</a>
			   	<c:remove var="pageNews" scope="request"/>
			   	</p></li>
			</ul>
		</div>
	</div>
	<div id="footer">
		<div id="site_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">Aboue Us</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">广告服务</a>
			<span>|</span>
			<a href="#">供稿服务</a>
			<span>|</span>
			<a href="#">法律声明</a>
			<span>|</span>
			<a href="#">招聘信息</a>
			<span>|</span>
			<a href="#">网站地图</a>
			<span>|</span>
			<a href="#">留言反馈</a>
		</div>
		<jsp:include page="/include_elements/bottom.jsp"></jsp:include>
	</div>
</body>
</html>
